<?=$this->render('header.phtml') ?>

<?=$this->render('logo.phtml') ?>

<script type="text/javascript">
window.onload = function() {
  setTimeout("document.forms[0].username.focus()", 1);
}
</script>

<?php if (isset($this->message) && is_array($this->message)): ?>
 <?php foreach ($this->message as $field => $msg): ?>
 <p style="margin-left: 1em;" class="message">Please retry for the field "<?=$field?>"<br />
  <?php foreach ($msg as $text): ?>
  <span class="message"><?=$text?></span><br />
  <?php endforeach; ?>
  </p>
 <?php endforeach; ?>
<?php else: ?>
 <p style="margin-left: 1em;" class="message"><?=$this->message?></p>
<?php endif; ?>

<form class="loginform" method="post" action="<?= $this->url(array(), 'loginpost') ?>">
<span style="display: block; float: left;"><a href="#" onclick="javascript:getElementById('about').style.display = 'block'"><img src="/images/aid-32.png" alt="?"></a></span>
<p class="notice">Please login.</p>
<p><label for="username">Username:</label> <input type="text" name="username" id="username" size="20" /></p>
<p><label for="password">Password:</label> <input type="password" id="password" name="password" size="20" /></p>
<p><label for="key">Key:</label> <input type="text" name="key" id="key" size="30" /></p>
<p><input type="submit" value="Login" /></p> 
</form>

<p style="text-align: center;"><a href="<?= $this->url(array(), 'signup') ?>" title="Signup"><img src="/images/signup.png" alt="Sign-up with Your Yubikey"></a></p>

<?=$this->render('footer.phtml') ?>